from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token


urlpatterns = [
    #/users/usernames/(?P<username>\w{5,20})/count/
    url(r'^usernames/(?P<username>\w{5,20})/count/$',views.RegisterUsernameCountAPIView.as_view(),name='usernamecount'),
    url(r'^phones/(?P<mobile>1[345789]\d{9})/count/$',views.RegisterMobileCountAPIView.as_view(),name='usermobilecount'),
    # url(r'^imagecodes/(?P<image_code_id>.+)/$', views.RegisterImageCodeView.as_view(),name='ImageCode'),
    # url(r'^smscodes/(?P<mobile>1[345789]\d{9})/$', views.RegisterSMSCodeView.as_view(), name='RegisterSMSCode'),
    url(r'^$',views.RegisterUserAPIView.as_view()),
    url(r'^auths/', obtain_jwt_token),
    url(r'^infos/$', views.UserDetailView.as_view()),
    url(r'^emails/$',views.EmailView.as_view()),
    url(r'^emails/verification/$',views.VerificationEmailView.as_view()),


    # //TODO
    url(r'^addresses/$', views.AddressAPIView.as_view()),
]